package indv.Cshen.cfengsecurityshirodemo.util;

import indv.Cshen.cfengsecurityshirodemo.domain.ShiroUser;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

/**
 * @author Cfeng
 * @date 2022/7/19
 * 简单一点，这里就不创建数据库了，直接从这个类中获取
 */

public class TestData {

    private static List<ShiroUser> users;

    public static  List<ShiroUser> getAllUsers() {
        List<ShiroUser> list = new ArrayList<>();
        if(null == users) {
            list.add(new ShiroUser("admin","3ef7164d1f6167cb9f2658c07d3c2f0a","15800000000", Arrays.asList("admin"),Arrays.asList("mobile","salary")));
            list.add(new ShiroUser("Cfeng","3660f95345484ceec990bd052fb12613","17766660000" , Arrays.asList("Cfeng"),Arrays.asList("mobile")));
            list.add(new ShiroUser("worker","95d4c46d3c1c3828073e76aa5a97bfbe", "13999999999",Arrays.asList("worker"),Arrays.asList("")));
        }
        return list;
    }
}
